import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home',
      name: 'main',
      component:resolve=>(require(["@/components/main"],resolve)),
      meta:{
        title:"首页"
      },
      children:[
        {
          path: '/chuli',
          name: 'chuli',
          component:resolve=>(require(["@/components/chuli"],resolve)),
          meta:{
            title:"处理中心"
          }
        },
        {
          path: '/gztai',
          name: 'gztai',
          component:resolve=>(require(["@/components/gztai"],resolve)),
          meta:{
            title:"我的控制台"
          }
        },
        {
          path: '/message',
          name: 'message',
          component:resolve=>(require(["@/components/message"],resolve)),
          meta:{
            title:"消息中心"
          }
        },
        {
          path: '/order',
          name: 'order',
          component:resolve=>(require(["@/components/order"],resolve)),
          meta:{
            title:"订单中心"
          }
        }
      ]
    },
    {
      path: '/ceshi1',
      name: 'main',
      component:resolve=>(require(["@/components/main"],resolve)),
      meta:{
        title:"测试1"
      },
    },
    {
      path: '/ceshi2',
      name: 'main',
      component:resolve=>(require(["@/components/main"],resolve)),
      meta:{
        title:"测试2"
      },
    },
    {
      path: '/ceshi3',
      name: 'main',
      component:resolve=>(require(["@/components/main"],resolve)),
      meta:{
        title:"测试3"
      },
    }

  ]
})
